package com.coder.rental.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author: zhanglin
 * @description:   封装前端路由对象
 * @date 2025/3/30
 */
@Data
public class RouteVo {
    private String path;            //路由地址
    private String component;       //配置组件
    private String name;            //路由名称
    private Boolean alwaysShow;     //一直显示路由
    private Meta meta;              //路由权限，结合children子路由可是否显示子路由
    private List<RouteVo> children;

    //路由权限
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Meta{
        private String title;     //标题
        private String icon;      //图标
        private Object[] roles;   //角色数组
    }
}
